<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__PUBLIC__/font-awesome/css/font-awesome.min.css" media="all">
    <link rel="stylesheet" href="__CSS__/admin.css"  media="all">
    <script src="{$Think.config.httpFlag}{$Think.config.google_map_url}" async="async"></script>
</head>
<style>
    .layui-upload-img{
        width: 100px;
    }
    .layui-tab-content{
        position: relative;
        height: 570px;
        overflow-y:auto ;
        overflow-x: hidden;
    }
    .layui-form-item .layui-input-inline{
        width: 500px;
    }
    .uploadimgbox{
        position: relative;
        display: inline-block;
        width: 100px;
        height: 100px;
        margin-right: 15px;
        margin-bottom: 15px;
    }

    .uploadimgbox  .layui-icon{
        position: absolute;
        right: -15px;
        top: -15px;
        cursor: pointer;
    }
    .layui-table th, .layui-table td{
        padding: 9px 6px;
        text-align: center;
    }
    .operation-menu a{
        margin: 5px 0;!important;
    }
    .layui-form-item{
        margin-bottom:0px;
    }
    .layui-input-block{
        margin-left: 0px;
        min-height: 0px;
    }
    .layui-table[lay-skin=line] td, .layui-table[lay-skin=line] th {
        max-width: 300px;
    }
    .layui-form-item{
        margin-bottom:10px;
    }
    .ourCity dl{
        z-index:1000;
    }
</style>
<body>
<div class="layui-fluid main">
    <fieldset class="layui-elem-field site-demo-button" style="margin-top: 30px;border:0">
        <div class="layui-form-item" style="float: left;">
            <form id="form1" class="layui-form serch" action="{:url('admin/poi/exportpoi')}" method="post">
                <div class="layui-form-item" style="float: left;width:100%">
                    <div class="layui-input-inline">
                        <div class="layui-inline">
                            <select name="cityCode" lay-search="">
                                <option value="">城市</option>
                                {volist name='thirdcity' id='vo'}
                                <option {if isset($post['cityCode'])&&$vo['code']==$post['cityCode']}selected{/if} value="{$vo.code}">{$vo.name}</option>
                                {/volist}
                            </select>
                        </div>
                        <div class="layui-inline">
                            <select name="cateType" lay-search="">
                                <option value="">类型</option>
                                <option value="Attraction" {if isset($post['cateType'])&&'Attraction'==$post['cateType']}selected{/if}>景点</option>
                                <option value="Restaurant" {if isset($post['cateType'])&&'Restaurant'==$post['cateType']}selected{/if}>美食</option>
                                <option value="Others" {if isset($post['cateType'])&&'Others'==$post['cateType']}selected{/if}>其他</option>
                            </select>
                        </div>
                    </div>
                    <button class="layui-btn layui-btn-default layui-btn-sm">搜索</button>
                    <a href="{:url('Admin/poi/citypoi')}" class="layui-btn layui-btn-default layui-btn-sm">返回列表页</a>
                </div>
            </form>

        </div>
    </fieldset>
    <div>
    <table class="layui-table" lay-even="" lay-skin="line" >
        <colgroup>
            <col width="10%">
            <col width="10%">
            <col width="6%">
            <col width="5%">
            <col width="10%">
            <col width="10%">
            <col width="10%">
            <col width="10%">
            <col width="10%">
            <col width="6%">
            <col width="6%">
        </colgroup>
        <thead>

        <tr>
            <th>产品名称</th>
            <th>产品英文名称</th>
            <th>城市</th>
            <th>打分</th>
            <th>分类</th>
            <th>客服电话</th>
            <th>地址</th>
            <th>备注</th>
            <th>创建时间</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name='list' id='value' key='key'}
        <tr>
            <td>{$value.name}</td>
            <td>{$value.nameen}</td>
            <td>{$value.city}</td>
            <td>{$value.rating}</td>
            <td>{$value.categories}</td>
            <td>{$value.phone}</td>
            <td>{$value.address}</td>
            <td>{$value.moreAbout}</td>
            <td>{$value.createdAt}</td>
            <td>{if !empty($value['poiinfo'])}<span style="color:red">已入库</span>{else}未入库{/if}</td>
            <td>
                <button class="layui-btn layui-btn-sm showInfo" data-id="{$value['urlId']}">查看POI</button>
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
        <!-- 头部公共文件 -->
        {include file="public/page"}
    </div>
</div>

<div id="frame_content" style="display:none">
    <div class="layui-fluid main" style="width:45%;float:left;">
        <header style="margin: 30px auto;">
            <span style="font-size:16px;font-weight:bold">POI详情</span>
            <button class="layui-btn layui-btn-normal label-info exportimg" style="float:right;margin-right:60px;">导入图片</button>
            <button class="layui-btn label-info export" style="float:right;margin-right:10px;">导入内容</button>
            <!--<a href="" class="layui-btn label-info" style="float: right;margin-right:10px;">一键导入</a>-->
        </header>
        <style>
            .poiinfo .poiinfo_title{
                line-height: 30px;
                font-weight: bold;
                width: 20%;
                text-align: right;
                float: left;
            }
            .poiinfo .poiinfo_content{
                color:#9c9c9c;
                line-height: 30px;
                width: 80%;
                text-align: left;
                height: auto;
                float: left;

            }
            .poiinfo .poiinfo_content img{
                margin: 5px 5px;
            }
            .poi_img{
                display:inline-block;
                position: relative;
            }

            .poi_img_shadow {
                height: 0;
                width: 0;
                border-left: 0px solid transparent;
                border-bottom: 50px solid transparent;
                border-right: 50px solid transparent;
                border-top: 50px solid red;
                position: absolute;
                top: 5px;
                left: 5px;
                display: none;
            }
            .highLight{
                display:inline-block;
            }
        </style>
        <div class="poiinfo" style="height:600px;overflow:scroll;overflow-x:hidden;overflow-y:auto ">
            <div>
                <div class="poiinfo_title">联系方式：</div>
                <div class="poiinfo_content"></div>
            </div>
            <div>
                <div class="poiinfo_title">联系方式：</div>
                <div class="poiinfo_content"></div>
            </div>
            <div>
                <div class="poiinfo_title">联系方式：</div>
                <div class="poiinfo_content">
                </div>
            </div>
            <div style="clear:both"></div>

        </div>
    </div>
    <div class="layui-fluid main" style="width:50%;float:left;padding:0">
        <div class="layui-tab layui-tab-card" style="box-shadow: none">
        <ul class="layui-tab-title">
            <li class="layui-this">景点</li>
            <li >体验项目</li>
            <li >演出赛事</li>
            <li >限时活动</li>
            <li >酒店</li>
            <li >美食</li>
            <li >其他</li>
        </ul>
        <div class="layui-tab-content">
        <div id="map" style="width: 600px;height: 200px;margin: 10px 0;margin-left: 110px">
        </div>
        <div class="layui-tab-item layui-show">
            <form class="layui-form" id="spots">

                <div class="layui-form-item ourCity">
                    <label class="layui-form-label">城市</label>
                    <div class="layui-input-inline" style="position: relative">
                        <select name="groupid" lay-search="" autocomplete="off" lay-verify="required">
                            <option value="">请选择</option>
                            {volist name='ourcity' id='vo'}
                            <option value="{$vo.id}">{$vo.name}</option>
                            {/volist}
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">名称</label>
                    <div class="layui-input-inline" style="position: relative">
                        <input name="name" value="" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">英文名</label>
                    <div class="layui-input-inline">
                        <input name="eng_name" maxlength="255" id="spotschname"  value=""   placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        <div class="addressbox"></div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">排序</label>
                    <div class="layui-input-inline">
                        <input name="poi_sort" maxlength="50" style="width:150px;" value=""  placeholder="请输入" autocomplete="off" class="layui-input" type="number">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">地址</label>
                    <div class="layui-input-inline">
                        <input name="address" id="spotsenname" value="" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                    </div>
                </div>

                <input type="hidden" name="lat" value="">
                <input type="hidden" name="lng" value="">
                <input type="hidden" name="link_source" value="">
                <input type="hidden" name="place_id" value="">

                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">中文介绍</label>
                    <div class="layui-input-inline" >
                        <textarea placeholder="请输入内容" id="introduce" class="layui-textarea" name="introduce"></textarea>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">英文简介</label>
                    <div class="layui-input-inline">
                        <textarea  placeholder="请输入内容" class="layui-textarea" name="eng_introduce"></textarea>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">开放时间</label>
                    <div class="layui-input-inline">
                        <textarea  placeholder="请输入内容" class="layui-textarea" name="open_time"></textarea>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">门票信息</label>
                    <div class="layui-input-inline">
                        <textarea placeholder="请输入内容" class="layui-textarea" name="ticket"></textarea>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">联系方式</label>
                    <div class="layui-input-inline">
                        <textarea placeholder="请输入内容" class="layui-textarea" name="mobile"></textarea>

                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">来源</label>
                    <div class="layui-input-inline">
                        <input name="source"  value="{notempty name='$menu'}{$menu.source}{/notempty}" placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">评分</label>
                    <div class="layui-input-inline">
                        <input name="score"  value="{notempty name='$menu'}{$menu.score}{/notempty}" placeholder="0~5；例：2.3" autocomplete="off" class="layui-input" type="number" min="0" max="5" step="0.1">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">特别说明</label>
                    <div class="layui-input-inline">
                        <textarea  placeholder="主要填写目的地当季的时效性动态（节日、活动等）" class="layui-textarea" name="description">{notempty name='$menu'}{$menu.description}{/notempty}</textarea>
                    </div>
                </div>

                <div class="layui-form-item" style="margin:0 110px ">
                    <div class="layui-upload">
                        <!--<button type="button" class="layui-btn" id="upload1">图片上传（格式：jpg,png,gif,jpeg）                                                                                      </button>-->
                        <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                            预览图：
                            <div class="layui-upload-list" id="seeupload1">


                            </div>
                        </blockquote>
                    </div>
                    <input id="upload-thumb1" type="hidden" name="thumb" value="">
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <input type="hidden" name="id" value="">
                        <input type="hidden" name="typeid" value="1">
                        <input type="hidden" name="from" value="tripAdvisor">
                        <button class="layui-btn" lay-submit lay-filter="spots">立即提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>

            </form>
        </div>
            <div class="layui-tab-item">
                <form class="layui-form" id="experience">
                    <div class="layui-form-item">
                        <label class="layui-form-label">城市</label>
                        <div class="layui-input-inline" style="position: relative">
                            <select name="groupid" lay-search="" lay-verify="required">
                                <option value="">请选择</option>
                                {volist name='ourcity' id='vo'}
                                <option value="{$vo.id}">{$vo.name}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">名称</label>
                        <div class="layui-input-inline" style="position: relative">
                            <input name="name"  maxlength="255" value="" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">英文名</label>
                        <div class="layui-input-inline">
                            <input name="eng_name" id="expchname" maxlength="255" value=""   placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                            <div class="addressbox"></div>

                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">排序</label>
                        <div class="layui-input-inline">
                            <input name="poi_sort" maxlength="50" style="width:150px;" value=""  placeholder="请输入" autocomplete="off" class="layui-input" type="number">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">地址</label>
                        <div class="layui-input-inline">
                            <input name="address" id="expaddress"  maxlength="50" value="" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>

                    <input type="hidden" name="lat" value="">
                    <input type="hidden" name="lng" value="">
                    <input type="hidden" name="link_source" value="">
                    <input type="hidden" name="place_id" value="">


                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">简介</label>
                        <div class="layui-input-inline">
                            <textarea  placeholder="请输入内容" id="introduce2" class="layui-textarea" name="introduce"></textarea>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">开放时间</label>
                        <div class="layui-input-inline">
                            <textarea  placeholder="请输入内容" class="layui-textarea" name="open_time"></textarea>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">用时参考</label>
                        <div class="layui-input-inline">
                            <textarea  placeholder="请输入内容" class="layui-textarea" name="use_time"></textarea>
                        </div>
                    </div>


                    <!--<div class="layui-form-item layui-form-text">-->
                    <!--<label class="layui-form-label">价格</label>-->
                    <!--<div class="layui-input-inline">-->
                    <!--<textarea  placeholder="请输入内容" class="layui-textarea" name="price">{notempty name='$menu'}{$menu.price}{/notempty}</textarea>-->
                    <!--</div>-->
                    <!--</div>-->

                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">门票信息</label>
                        <div class="layui-input-inline">
                            <textarea placeholder="请输入内容" class="layui-textarea" name="ticket"></textarea>
                        </div>
                    </div>



                    <div class="layui-form-item">
                        <label class="layui-form-label">联系方式</label>
                        <div class="layui-input-inline">
                            <textarea placeholder="请输入内容" class="layui-textarea" name="mobile"></textarea>

                        </div>
                    </div>


                    <div class="layui-form-item">
                        <label class="layui-form-label">来源</label>
                        <div class="layui-input-inline">
                            <input name="source" maxlength="50"  value=""  placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">评分</label>
                        <div class="layui-input-inline">
                            <input name="score"  value="" placeholder="0~5；例：2.3" autocomplete="off" class="layui-input" type="number" min="0" max="5" step="0.1">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">特别说明</label>
                        <div class="layui-input-inline">
                            <textarea placeholder="请输入内容" class="layui-textarea" name="description"></textarea>
                        </div>
                    </div>

                    <div class="layui-form-item" style="margin:0 110px ">
                        <div class="layui-upload">
                            <!--<button type="button" class="layui-btn" id="upload2">图片上传（格式：jpg,png,gif,jpeg）</button>-->
                            <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                预览图：
                                <div class="layui-upload-list" id="seeupload2">


                                </div>
                            </blockquote>
                        </div>
                        <input id="upload-thumb2" type="hidden" name="thumb" value="">
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="id" value="">
                            <input type="hidden" name="typeid" value="2">
                            <input type="hidden" name="from" value="tripAdvisor">
                            <button class="layui-btn" lay-submit lay-filter="experience">立即提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>

                </form>
            </div>
            <div class="layui-tab-item">
                <form class="layui-form" id="show">
                    <div class="layui-form-item">
                        <label class="layui-form-label">城市</label>
                        <div class="layui-input-inline" style="position: relative">
                            <select name="groupid" lay-search="" lay-verify="required">
                                <option value="">请选择</option>
                                {volist name='ourcity' id='vo'}
                                <option value="{$vo.id}">{$vo.name}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">名称</label>
                        <div class="layui-input-inline" style="position: relative">
                            <input name="name" maxlength="255" value="" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">英文名</label>
                        <div class="layui-input-inline">
                            <input name="eng_name" id="showchname" maxlength="255" value=""   placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                            <div class="addressbox"></div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">排序</label>
                        <div class="layui-input-inline">
                            <input name="poi_sort" maxlength="50" style="width:150px;" value=""  placeholder="请输入" autocomplete="off" class="layui-input" type="number">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">地址</label>
                        <div class="layui-input-inline">
                            <input name="address" id="showaddress"  maxlength="50"  value="" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>

                    <input type="hidden" name="lat" value="">
                    <input type="hidden" name="lng" value="">
                    <input type="hidden" name="link_source" value="">
                    <input type="hidden" name="place_id" value="">


                    <div class="layui-form-item">
                        <label class="layui-form-label">简介</label>
                        <div class="layui-input-inline">
                            <textarea placeholder="请输入内容" id="introduce3" class="layui-textarea" name="introduce"></textarea>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">订票网址</label>
                        <div class="layui-input-inline">
                            <input name="ticket_url" maxlength="100" value=""  placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">开放时间</label>
                        <div class="layui-input-inline">
                            <textarea  placeholder="请输入内容" class="layui-textarea" name="open_time"></textarea>

                        </div>
                    </div>


                    <div class="layui-form-item">
                        <label class="layui-form-label">来源</label>
                        <div class="layui-input-inline">
                            <input name="source" maxlength="50" value=""  placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">评分</label>
                        <div class="layui-input-inline">
                            <input name="score"  value="" placeholder="0~5；例：2.3" autocomplete="off" class="layui-input" type="number" min="0" max="5" step="0.1">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">特别说明</label>
                        <div class="layui-input-inline">
                            <textarea placeholder="请输入内容" class="layui-textarea" name="description"></textarea>
                        </div>
                    </div>

                    <div class="layui-form-item" style="margin:0 110px ">
                        <div class="layui-upload">
                            <!--<button type="button" class="layui-btn" id="upload3">图片上传（格式：jpg,png,gif,jpeg）</button>-->
                            <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                预览图：
                                <div class="layui-upload-list" id="seeupload3">


                                </div>
                            </blockquote>
                        </div>
                        <input id="upload-thumb3" type="hidden" name="thumb" value="">
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="id" value="">
                            <input type="hidden" name="typeid" value="3">
                            <input type="hidden" name="from" value="tripAdvisor">
                            <button class="layui-btn" lay-submit lay-filter="show">立即提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>

                </form>
            </div>
            <div class="layui-tab-item">
                <form class="layui-form" id="town">
                    <div class="layui-form-item">
                        <label class="layui-form-label">城市</label>
                        <div class="layui-input-inline" style="position: relative">
                            <select name="groupid" lay-search="" lay-verify="required">
                                <option value="">请选择</option>
                                {volist name='ourcity' id='vo'}
                                <option value="{$vo.id}">{$vo.name}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">名称</label>
                        <div class="layui-input-inline" style="position: relative">
                            <input name="name" maxlength="255" value="" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">英文名</label>
                        <div class="layui-input-inline">
                            <input name="eng_name" id="townchname" maxlength="255" value=""   placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                            <div class="addressbox"></div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">排序</label>
                        <div class="layui-input-inline">
                            <input name="poi_sort" maxlength="50" style="width:150px;" value=""  placeholder="请输入" autocomplete="off" class="layui-input" type="number">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">地址</label>
                        <div class="layui-input-inline">
                            <input name="address" maxlength="50" id="townaddress"  value="" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>

                    <input type="hidden" name="lat" value="">
                    <input type="hidden" name="lng" value="">
                    <input type="hidden" name="link_source" value="">
                    <input type="hidden" name="place_id" value="">

                    <div class="layui-form-item">
                        <label class="layui-form-label">来源</label>
                        <div class="layui-input-inline">
                            <input name="source" maxlength="50" value=""  placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">评分</label>
                        <div class="layui-input-inline">
                            <input name="score"  value="" placeholder="0~5；例：2.3" autocomplete="off" class="layui-input" type="number" min="0" max="5" step="0.1">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">特别说明</label>
                        <div class="layui-input-inline">
                            <textarea placeholder="请输入内容" class="layui-textarea" name="description">{notempty name='$menu'}{$menu.description}{/notempty}</textarea>
                        </div>
                    </div>

                    <div class="layui-form-item" style="margin:0 110px ">
                        <div class="layui-upload">
                            <!--<button type="button" class="layui-btn" id="upload4">图片上传（格式：jpg,png,gif,jpeg）</button>-->
                            <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                预览图：
                                <div class="layui-upload-list" id="seeupload4">


                                </div>
                            </blockquote>
                        </div>
                        <input id="upload-thumb4" type="hidden" name="thumb" value="">
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="id" value="">
                            <input type="hidden" name="typeid" value="4">
                            <input type="hidden" name="from" value="tripAdvisor">
                            <button class="layui-btn" lay-submit lay-filter="town">立即提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>

                </form>
            </div>
            <div class="layui-tab-item">
                <form class="layui-form" id="hotel">
                    <div class="layui-form-item">
                        <label class="layui-form-label">城市</label>
                        <div class="layui-input-inline" style="position: relative">
                            <select name="groupid" lay-search="" lay-verify="required">
                                <option value="">请选择</option>
                                {volist name='ourcity' id='vo'}
                                <option value="{$vo.id}">{$vo.name}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">名称</label>
                        <div class="layui-input-inline" style="position: relative">
                            <input name="name" maxlength="255" value="" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">英文名</label>
                        <div class="layui-input-inline">
                            <input name="eng_name" id="hotelchname" maxlength="255" value=""  placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                            <div class="addressbox"></div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">排序</label>
                        <div class="layui-input-inline">
                            <input name="poi_sort" maxlength="50" style="width:150px;" value=""  placeholder="请输入" autocomplete="off" class="layui-input" type="number">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">地址</label>
                        <div class="layui-input-inline">
                            <input name="address" id="hoteladdress" maxlength="50"  value="" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>
                    <input type="hidden" name="lat" value="">
                    <input type="hidden" name="lng" value="">
                    <input type="hidden" name="link_source" value="">
                    <input type="hidden" name="place_id" value="">


                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">星级</label>
                        <div class="layui-input-inline">
                            <select name="grade">
                                <option value="" ></option>
                                <option value="1" >一星</option>
                                <option value="2" >二星</option>
                                <option value="3" >三星</option>
                                <option value="4" >四星</option>
                                <option value="5" >五星</option>
                            </select>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">联系方式</label>
                        <div class="layui-input-inline">
                            <textarea placeholder="请输入内容" class="layui-textarea" name="mobile"></textarea>
                        </div>
                    </div>


                    <div class="layui-form-item">
                        <label class="layui-form-label">来源</label>
                        <div class="layui-input-inline">
                            <input name="source" maxlength="50" value="" placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">评分</label>
                        <div class="layui-input-inline">
                            <input name="score"  value="" placeholder="0~5；例：2.3" autocomplete="off" class="layui-input" type="number" min="0" max="5" step="0.1">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">特别说明</label>
                        <div class="layui-input-inline">
                            <textarea placeholder="请输入内容" class="layui-textarea" name="description"></textarea>
                        </div>
                    </div>

                    <div class="layui-form-item" style="margin:0 110px ">
                        <div class="layui-upload">
                            <!--<button type="button" class="layui-btn" id="upload5">图片上传（格式：jpg,png,gif,jpeg）</button>-->
                            <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                预览图：
                                <div class="layui-upload-list" id="seeupload5">


                                </div>
                            </blockquote>
                        </div>
                        <input id="upload-thumb5" type="hidden" name="thumb" value="">
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="id" value="">
                            <input type="hidden" name="typeid" value="5">
                            <input type="hidden" name="from" value="tripAdvisor">
                            <button class="layui-btn" lay-submit lay-filter="hotel">立即提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>

                </form>
            </div>
            <div class="layui-tab-item">
                <form class="layui-form" id="food">
                    <div class="layui-form-item">
                        <label class="layui-form-label">城市</label>
                        <div class="layui-input-inline" style="position: relative">
                            <select name="groupid" lay-search="" lay-verify="required">
                                <option value="">请选择</option>
                                {volist name='ourcity' id='vo'}
                                <option value="{$vo.id}">{$vo.name}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">名称</label>
                        <div class="layui-input-inline" style="position: relative">
                            <input name="name" maxlength="255" value="" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">英文名</label>
                        <div class="layui-input-inline">
                            <input name="eng_name" id="foodchname" maxlength="255" value=""  placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                            <div class="addressbox"></div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">菜系</label>
                        <div class="layui-input-inline">
                            <input name="cooking" maxlength="50" value=""  placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">排序</label>
                        <div class="layui-input-inline">
                            <input name="poi_sort" maxlength="50" style="width:150px;" value=""  placeholder="请输入" autocomplete="off" class="layui-input" type="number">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">地址</label>
                        <div class="layui-input-inline">
                            <input name="address" maxlength="50" id="foodaddress"  value="" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>
                    <input type="hidden" name="lat" value="">
                    <input type="hidden" name="lng" value="">
                    <input type="hidden" name="link_source" value="">
                    <input type="hidden" name="place_id" value="">

                    <div class="layui-form-item">
                        <label class="layui-form-label">来源</label>
                        <div class="layui-input-inline">
                            <input name="source" maxlength="50" value=""  placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">评分</label>
                        <div class="layui-input-inline">
                            <input name="score"  value="" placeholder="0~5；例：2.3" autocomplete="off" class="layui-input" type="number" min="0" max="5" step="0.1">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">餐厅简介</label>
                        <div class="layui-input-inline">
                            <textarea placeholder="请输入内容" class="layui-textarea" name="description"></textarea>
                        </div>
                    </div>

                    <div class="layui-form-item" style="margin:0 110px ">
                        <div class="layui-upload">
                            <!--<button type="button" class="layui-btn" id="upload6">图片上传（格式：jpg,png,gif,jpeg）</button>-->
                            <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                预览图：
                                <div class="layui-upload-list" id="seeupload11">


                                </div>
                            </blockquote>
                        </div>
                        <input id="upload-thumb11" type="hidden" name="thumb" value="">
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="id" value="">
                            <input type="hidden" name="typeid" value="11">
                            <input type="hidden" name="from" value="tripAdvisor">
                            <button class="layui-btn" lay-submit lay-filter="food">立即提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>

                </form>
            </div>
            <div class="layui-tab-item">
                <form class="layui-form" id="other">
                    <div class="layui-form-item">
                        <label class="layui-form-label">城市</label>
                        <div class="layui-input-inline" style="position: relative">
                            <select name="groupid" lay-search="" lay-verify="required">
                                <option value="">请选择</option>
                                {volist name='ourcity' id='vo'}
                                <option value="{$vo.id}">{$vo.name}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">名称</label>
                        <div class="layui-input-inline" style="position: relative">
                            <input name="name" maxlength="255" value="" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" type="text">

                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">英文名</label>
                        <div class="layui-input-inline">
                            <input name="eng_name" id="otherchname" maxlength="255" value=""  placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                            <div class="addressbox"></div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">排序</label>
                        <div class="layui-input-inline">
                            <input name="poi_sort" maxlength="50" style="width:150px;" value=""  placeholder="请输入" autocomplete="off" class="layui-input" type="number">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">地址</label>
                        <div class="layui-input-inline">
                            <input name="address" maxlength="50" id="otheraddress"  value="" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>
                    <input type="hidden" name="lat" value="">
                    <input type="hidden" name="lng" value="">
                    <input type="hidden" name="link_source" value="">
                    <input type="hidden" name="place_id" value="">

                    <div class="layui-form-item">
                        <label class="layui-form-label">来源</label>
                        <div class="layui-input-inline">
                            <input name="source" maxlength="50" value=""  placeholder="请输入" autocomplete="off" class="layui-input" type="text">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">评分</label>
                        <div class="layui-input-inline">
                            <input name="score"  value="" placeholder="0~5；例：2.3" autocomplete="off" class="layui-input" type="number" min="0" max="5" step="0.1">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">特别说明</label>
                        <div class="layui-input-inline">
                            <textarea placeholder="请输入内容" class="layui-textarea" name="description"></textarea>
                        </div>
                    </div>

                    <div class="layui-form-item" style="margin:0 110px ">
                        <div class="layui-upload">
                            <!--<button type="button" class="layui-btn" id="upload6">图片上传（格式：jpg,png,gif,jpeg）</button>-->
                            <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                预览图：
                                <div class="layui-upload-list" id="seeupload6">


                                </div>
                            </blockquote>
                        </div>
                        <input id="upload-thumb6" type="hidden" name="thumb" value="">
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="id" value="">
                            <input type="hidden" name="typeid" value="6">
                            <input type="hidden" name="from" value="tripAdvisor">
                            <button class="layui-btn" lay-submit lay-filter="other">立即提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>

                </form>
            </div>
        </div>
        </div>
    </div>
</div>
    <script src="__PUBLIC__/layui/layui.js"></script>
    <script src="__PUBLIC__/jquery/jquery.min.js"></script>
<script>
    //地图功能
    var geocoder;
    var map2;
    var marker=new google.maps.Marker();
    function initialize(lat,lng) {
        lat = lat || 39.90419989999999;
        lng = lng || 116.40739630000007;
        geocoder = new google.maps.Geocoder();
        var myOptions = {
            zoom : 10,//缩放比例
            center:new google.maps.LatLng(lat,lng),
            mapTypeId : google.maps.MapTypeId.ROADMAP
        }
        map2 = new google.maps.Map(document.getElementById("map"),
            myOptions);
        marker.setMap(null);
        marker = new google.maps.Marker({
            map : map2,
            position :new google.maps.LatLng(lat,lng),
            //坐标动画效果
            animation : google.maps.Animation.DROP
        });
        marker.setMap(map2);
        codeAddress();
    }

    function codeAddress(address) {
        //地址解析
        geocoder.geocode({
            'address' : address
        }, function(results, status) {
            console.log(results);
            if (status == google.maps.GeocoderStatus.OK) {
                //依据解析的经度纬度设置坐标居中
                map2.setCenter(results[0].geometry.location);
                marker = new google.maps.Marker({
                    map : map2,
                    position : results[0].geometry.location,
                    title : address,
                    //坐标动画效果
                    animation : google.maps.Animation.DROP
                });

                $("input[name=lat]").val(results[0].geometry.location.lat);
                $("input[name=lng]").val(results[0].geometry.location.lng);
                $("input[name=place_id]").val(results[0].place_id);

                marker.setMap(map2);
            }
        });
    }

    function Address(obj) {
        var address = document.getElementById(obj).value;
        var addressbox="";
        //地址解析
        geocoder.geocode({
            'address' : address
        }, function(results, status) {
            if (status == google.maps.GeocoderStatus.OK) {
                for(var i in results){
                    if(i>4){
                        break;
                    }
                    addressbox+="<span>"+results[i].formatted_address+"</span>";
                }
                $(".addressbox").html(addressbox);
            } else {
            }
        });
    }
    //初始化地图
    initialize(39.90419989999999,116.40739630000007);
    layui.use(['layer', 'form'], function() {
        var layer = layui.layer,
            $ = layui.jquery,
            form = layui.form;
        $(window).on('load', function() {

            //景点
            form.on('submit(spots)', function(data) {
                var spots_load_index = layer.load(1);
                $.ajax({
                    url:"{:url('admin/poi/addpoi')}",
                    data:$('#spots').serialize(),
                    type:'post',
                    async: false,
                    success:function(res) {
                        layer.close(spots_load_index);
                        layer.msg(res.msg);
                        console.log(res);
                        if(res.code == 1) {
                            setTimeout(function(){
                                window.location.reload();
                            },1500)
                        }
                    }
                })
                return false;
            });

            //体验项目
            form.on('submit(experience)', function(data) {
                var experience_load_index = layer.load(1);
                $.ajax({
                    url:"{:url('admin/poi/addpoi')}",
                    data:$('#experience').serialize(),
                    type:'post',
                    async: false,
                    success:function(res) {
                        layer.close(experience_load_index)
                        layer.msg(res.msg);
                        if(res.code == 1) {
                            setTimeout(function(){
                                window.location.reload();
                            },1500)
                        }
                    }
                })
                return false;
            });

            //演出赛事
            form.on('submit(show)', function(data) {
                var show_load_index = layer.load(1);
                $.ajax({
                    url:"{:url('admin/poi/addpoi')}",
                    data:$('#show').serialize(),
                    type:'post',
                    async: false,
                    success:function(res) {
                        layer.close(show_load_index)
                        layer.msg(res.msg);
                        if(res.code == 1) {
                            setTimeout(function(){
                                window.location.reload();
                            },1500)
                        }
                    }
                })
                return false;
            });

            //当季特色
            form.on('submit(town)', function(data) {
                var town_load_index = layer.load(1);
                $.ajax({
                    url:"{:url('admin/poi/addpoi')}",
                    data:$('#town').serialize(),
                    type:'post',
                    async: false,
                    success:function(res) {
                        layer.close(town_load_index);
                        layer.msg(res.msg);
                        if(res.code == 1) {
                            setTimeout(function(){
                                window.location.reload();
                            },1500)
                        }
                    }
                })
                return false;
            });


            //酒店
            form.on('submit(hotel)', function(data) {
                var hotel_load_index = layer.load(1);
                $.ajax({
                    url:"{:url('admin/poi/addpoi')}",
                    data:$('#hotel').serialize(),
                    type:'post',
                    async: false,
                    success:function(res) {
                        layer.close(hotel_load_index);
                        layer.msg(res.msg);
                        if(res.code == 1) {
                            setTimeout(function(){
                                window.location.reload();
                            },1500)
                        }
                    }
                })
                return false;
            });


            //其他
            form.on('submit(other)', function(data) {
                var other_load_index = layer.load(1);
                $.ajax({
                    url:"{:url('admin/poi/addpoi')}",
                    data:$('#other').serialize(),
                    type:'post',
                    async: false,
                    success:function(res) {
                        layer.close(other_load_index);
                        layer.msg(res.msg);
                        if(res.code == 1) {
                            setTimeout(function(){
                                window.location.reload();
                            },1500)
                        }
                    }
                })
                return false;
            });

            //美食
            form.on('submit(food)', function(data) {
                var food_load_index = layer.load(1);
                $.ajax({
                    url:"{:url('admin/poi/addpoi')}",
                    data:$('#food').serialize(),
                    type:'post',
                    async: false,
                    success:function(res) {
                        layer.close(food_load_index);
                        layer.msg(res.msg);
                        if(res.code == 1) {
                            setTimeout(function(){
                                window.location.reload();
                            },1500)
                        }
                    }
                })
                return false;
            });

            //景点
            $("#spotschname").on("input",function(){
                $(".addressbox").html("");
                Address("spotschname");
            });

            $("#spots .addressbox").on("click","span",function(){
                marker.setMap(null);
                $("#spotsenname").val($(this).html());

                codeAddress($(this).html());
            });

            //体验项目
            $("#expchname").on("input",function(){
                $(".addressbox").html("");
                Address("expchname");
            });

            $("#experience .addressbox").on("click","span",function(){
                marker.setMap(null);
                $("#expaddress").val($(this).html());
                codeAddress($(this).html());
            });


            //演出赛事
            $("#showchname").on("input",function(){
                $(".addressbox").html("");
                Address("showchname");
            });

            $("#show .addressbox").on("click","span",function(){
                marker.setMap(null);
                $("#showaddress").val($(this).html());
                codeAddress($(this).html());
            });

            //当季特色
            $("#townchname").on("input",function(){
                $(".addressbox").html("");
                Address("townchname");
            });

            $("#town .addressbox").on("click","span",function(){
                marker.setMap(null);
                $("#townaddress").val($(this).html());
                codeAddress($(this).html());
            });

            //酒店
            $("#hotelchname").on("input",function(){
                $(".addressbox").html("");
                Address("hotelchname");
            });

            $("#hotel .addressbox").on("click","span",function(){
                marker.setMap(null);
                $("#hoteladdress").val($(this).html());
                codeAddress($(this).html());
            });


            //其他
            $("#otherchname").on("input",function(){
                $(".addressbox").html("");
                Address("otherchname");
            });

            $("#other .addressbox").on("click","span",function(){
                marker.setMap(null);
                $("#otheraddress").val($(this).html());
                codeAddress($(this).html());
            });


            //美食
            $("#foodchname").on("input",function(){
                $(".addressbox").html("");
                Address("foodchname");
            });

            $("#food .addressbox").on("click","span",function(){
                marker.setMap(null);
                $("#foodaddress").val($(this).html());
                codeAddress($(this).html());
            });



            $("body").on("click",function(){
                $(".addressbox").html("");
            })
        });
    });
</script>
    <script>
        var message;
        layui.config({
            base: '__JS__/',
            version: '1.0.1'
        }).use(['app', 'message'], function() {
            var app = layui.app,
                $ = layui.jquery,
                layer = layui.layer;
            //将message设置为全局以便子页面调用
            message = layui.message;
            //主入口
            app.set({
                type: 'iframe'
            }).init();
        });

        layui.use('layer', function(){
            var layer = layui.layer;
            $('.a_menu').click(function(){
                var url = $(this).attr('href');
                var a = 0;
                $.ajax({
                    url:url
                    ,async:false
                    ,success:function(res){
                        if(res.code == 0) {
                            layer.msg(res.msg);
                            a = 1;
                        }
                    }
                })
                if(a === 0) {
                    layer.open({
                        type:2,
                        content:url,
                        area: ['800px', '680px'],
                        end:function(){
                            location.reload();
                        }
                    });
                }
                return false;
            })

        });
        layui.use('form', function () {
            var form = layui.form;
            form.on('switch(popular)', function(data){
                var id= $(this).attr('id')
                var popular;

                if(data.elem.checked){
                    popular =1;
                }else{
                    popular =0;
                }
                $.ajax({
                    url:"{:url('admin/goods/recommend')}",
                    data:{'id':id,'popular':popular},
                    type:'post',
                    async: false,
                    success:function(res) {

                        layer.msg(res.msg);
                        if(res.code == 1) {
                            setTimeout(function(){
                                location.reload();
                            },1500)

                        }
                    }
                })
            });
        });
        var allData = {$json_list};
        console.log(allData);
        var curPoiInfo = {};
        $(".showInfo").click(function(){
            var urlId=$(this).attr("data-id");
            $.each(allData,function(i,v){
                if(v.urlId==urlId){
                    curPoiInfo = allData[i];
                    renderPOIInfo(curPoiInfo)
                    return false;
                }
            })
            console.log(urlId,curPoiInfo);
            //打开一个弹窗 点击保存触发事件
            layer.open({
                type: 1,
                area: ['90%', '90%'],
                content: $('#frame_content')
            })
        })
        //渲染POI详情
        function renderPOIInfo(poi)
        {
            var str = "";
            var pic = "";
            $.each(poi,function(i,v){
                //如数据为空 填写展位字符
                if(v==""||v==null){
                    v = "&nbsp";
                }
                if(i=="pics"){
                    $.each(v,function(index,url){
                        pic += "<div class='poi_img'><div class='poi_img_shadow' data-url='"+url+"'></div><img width='150' src='"+url+"' alt=''></div>";
                    })
                }else{

                    str += "<div>\n" +
                        "<div class='poiinfo_title'>"+i+"：</div>\n" +
                        "<div class='poiinfo_content'>"+v+"</div>\n" +
                        "</div>\n";
                }
            })
            if(pic!=""){
                str += "<div>\n" +
                    "<div class='poiinfo_title'>picture：</div>\n" +
                    "<div class='poiinfo_content'>"+pic+"</div>\n" +
                    "</div>\n";
            }
            str += "<div style='clear:both'></div>";
            $(".poiinfo").children().remove();
            $(".poiinfo").append(str);
        }
        //转移数据
        $(".export").click(function(){
            if(curPoiInfo.length<=0){
                layer.msg("导入失败，请确认是否选择POI");return false;
            }else{
                marker.setMap(null);
                codeAddress(curPoiInfo.cityen+" "+curPoiInfo.nameen);
                $(".layui-tab-content input[name=link_source]").val(curPoiInfo.urlId)
                $(".layui-tab-content input[name=name]").val(curPoiInfo.name)
                $(".layui-tab-content input[name=eng_name]").val(curPoiInfo.nameen)
                $(".layui-tab-content input[name=address]").val(curPoiInfo.address)
                $(".layui-tab-content input[name=source]").val('猫途鹰--TripAdvisor')
                $(".layui-tab-content input[name=score]").val(parseInt(curPoiInfo.rating))
                $(".layui-tab-content textarea[name=description]").val(curPoiInfo.moreAbout)
                var phone = curPoiInfo.phone;
                $(".layui-tab-content textarea[name=mobile]").val(phone.replace("//s/g", ""))
                if(curPoiInfo.poiinfo!=null && curPoiInfo.poiinfo.id!=undefined){
                    $(".layui-tab-content input[name=id]").val(curPoiInfo.poiinfo.id)
                }
            }
            layer.msg("导入成功");return false;
        })
        //上传图片
        $(".exportimg").click(function(){
            var imgs = $(".poi_img .highLight");
            var selectedImg = [];
            console.log(imgs);
            if(imgs.length>0){
                $.each(imgs,function(i,v){
                    if($(v).attr('data-url')!=""){
                        selectedImg.push($(v).attr('data-url'));
                    }
                })
                console.log(selectedImg);
                if(selectedImg.length>0){
                    uploadExportImg(selectedImg,this);
                }else{
                    layer.msg("请选择图片资源");
                }
            }else{
                layer.msg("请选择图片资源");
            }
        })
        function uploadExportImg(imgs,_that){
            $(_that).attr("disabled","disabled");
            var upload_index = layer.load(1);
            $.post("/admin/poi/uploadExportImg",{imgs:imgs},function(data){
                layer.close(upload_index);
                $(_that).attr("disabled",false);
                if(data.code=='200'){
                    renderExportImgAllPoint(data.data)
                    //清除所有标记的图片
                    clearHighLightImg();
                    layer.msg("上传成功")
                }else{
                    layer.msg("上传失败");
                }
            },"json")

        }
        function clearHighLightImg()
        {
            var imgs = $(".highLight");
            if(imgs.length>0){
                $.each(imgs,function(i,v){
                    $(v).removeClass("highLight");
                })
            }
        }
        function renderExportImgAllPoint(data)
        {
            var str = '';
            var allImgUrl = data.join(",");
            $.each(data,function(i,v){
                str += '<span class="uploadimgbox"><img class="layui-upload-img" src="'+v+'"><i class="layui-icon">&#x1006;</i></span>';
            })
            $('#seeupload1').append(str);
            $('#seeupload2').append(str);
            $('#seeupload3').append(str);
            $('#seeupload4').append(str);
            $('#seeupload5').append(str);
            $('#seeupload6').append(str);
            $('#seeupload11').append(str);
            $('#upload-thumb1').val($('#upload-thumb1').val()+","+allImgUrl)
            $('#upload-thumb2').val($('#upload-thumb2').val()+","+allImgUrl)
            $('#upload-thumb3').val($('#upload-thumb3').val()+","+allImgUrl)
            $('#upload-thumb4').val($('#upload-thumb4').val()+","+allImgUrl)
            $('#upload-thumb5').val($('#upload-thumb5').val()+","+allImgUrl)
            $('#upload-thumb6').val($('#upload-thumb6').val()+","+allImgUrl)
            $('#upload-thumb11').val($('#upload-thumb11').val()+","+allImgUrl)
        }
    </script>
    <!-- 配置文件 -->
    <script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
    <!-- 编辑器源码文件 -->
    <script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.all.js"></script>
    <!-- 实例化编辑器 -->
    <script type="text/javascript">
        var ue = UE.getEditor('introduce');
        var ue2 = UE.getEditor('introduce2');
        var ue3 = UE.getEditor('introduce3');
    </script>
    <script>
        $(".poiinfo").on("click",'.poi_img',function(){
            var shadow= $(this).find(".poi_img_shadow")
            console.log(shadow,$(shadow).hasClass("highLight"));
            if($(shadow).hasClass("highLight")){
                $(shadow).removeClass("highLight");
            }else{
                $(shadow).addClass("highLight");
            }
        })

    </script>
    <script>
        layui.use('upload', function(){
            var upload = layui.upload;
            //执行实例
            upload.render({
                elem: '#upload1'
                ,url: "{:url('common/upload')}"
                ,multiple: true
                ,accept:"images"
                ,size:"50000"
                ,done: function(res){
                    //上传完毕回调
                    layer.closeAll('loading');
                    if(res.code == 2) {
                        $('#seeupload1').append('<span class="uploadimgbox"><img class="layui-upload-img" src="'+res.src+'"><i class="layui-icon">&#x1006;</i></span>');
                        $('#upload-thumb1').val($('#upload-thumb1').val()+","+res.src);
                    } else {
                        layer.msg(res.msg);
                    }
                }
                ,error: function(){
                    //请求异常回调
                    //演示失败状态，并实现重传
                    layer.closeAll('loading');
                    var demoText = $('#demoText');
                    demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-mini demo-reload">重试</a>');
                    demoText.find('.demo-reload').on('click', function(){
                        uploadInst.upload();
                    });
                }
                ,before:function(){
                    layer.load(2);
                }
            });

            upload.render({
                elem: '#upload2'
                ,url: "{:url('common/upload')}"
                ,multiple: true
                ,accept:"images"
                ,size:"50000"
                ,done: function(res){
                    //上传完毕回调
                    layer.closeAll('loading');
                    if(res.code == 2) {
                        $('#seeupload2').append('<span class="uploadimgbox"><img class="layui-upload-img" src="'+res.src+'"><i class="layui-icon">&#x1006;</i></span>');
                        $('#upload-thumb2').val($('#upload-thumb2').val()+","+res.src);
                    } else {
                        layer.msg(res.msg);
                    }
                }
                ,error: function(){
                    //请求异常回调
                    //演示失败状态，并实现重传
                    layer.closeAll('loading');
                    var demoText = $('#demoText');
                    demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-mini demo-reload">重试</a>');
                    demoText.find('.demo-reload').on('click', function(){
                        uploadInst.upload();
                    });
                }
                ,before:function () {
                    layer.load(2);
                }
            });

            upload.render({
                elem: '#upload3'
                ,url: "{:url('common/upload')}"
                ,multiple: true
                ,accept:"images"
                ,size:"50000"
                ,done: function(res){
                    //上传完毕回调
                    layer.closeAll('loading');
                    if(res.code == 2) {
                        $('#seeupload3').append('<span class="uploadimgbox"><img class="layui-upload-img" src="'+res.src+'"><i class="layui-icon">&#x1006;</i></span>');
                        $('#upload-thumb3').val($('#upload-thumb3').val()+","+res.src);
                    } else {
                        layer.msg(res.msg);
                    }
                }
                ,error: function(){
                    //请求异常回调
                    //演示失败状态，并实现重传
                    layer.closeAll('loading');
                    var demoText = $('#demoText');
                    demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-mini demo-reload">重试</a>');
                    demoText.find('.demo-reload').on('click', function(){
                        uploadInst.upload();
                    });
                }
                ,before:function () {
                    layer.load(2);
                }
            });

            upload.render({
                elem: '#upload4'
                ,url: "{:url('common/upload')}"
                ,multiple: true
                ,accept:"images"
                ,size:"50000"
                ,done: function(res){
                    //上传完毕回调
                    layer.closeAll('loading');
                    if(res.code == 2) {
                        $('#seeupload4').append('<span class="uploadimgbox"><img class="layui-upload-img" src="'+res.src+'"><i class="layui-icon">&#x1006;</i></span>');
                        $('#upload-thumb4').val($('#upload-thumb4').val()+","+res.src);
                    } else {
                        layer.msg(res.msg);
                    }
                }
                ,error: function(){
                    //请求异常回调
                    //演示失败状态，并实现重传
                    layer.closeAll('loading');
                    var demoText = $('#demoText');
                    demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-mini demo-reload">重试</a>');
                    demoText.find('.demo-reload').on('click', function(){
                        uploadInst.upload();
                    });
                }
                ,before:function () {
                    layer.load(2);
                }
            });

            upload.render({
                elem: '#upload5'
                ,url: "{:url('common/upload')}"
                ,multiple: true
                ,accept:"images"
                ,size:"50000"
                ,done: function(res){
                    //上传完毕回调
                    layer.closeAll('loading');
                    if(res.code == 2) {
                        $('#seeupload5').append('<span class="uploadimgbox"><img class="layui-upload-img" src="'+res.src+'"><i class="layui-icon">&#x1006;</i></span>');
                        $('#upload-thumb5').val($('#upload-thumb5').val()+","+res.src);
                    } else {
                        layer.msg(res.msg);
                    }
                }
                ,error: function(){
                    //请求异常回调
                    //演示失败状态，并实现重传
                    layer.closeAll('loading');
                    var demoText = $('#demoText');
                    demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-mini demo-reload">重试</a>');
                    demoText.find('.demo-reload').on('click', function(){
                        uploadInst.upload();
                    });
                }
                ,before:function () {
                    layer.load(2);
                }
            });

            upload.render({
                elem: '#upload6'
                ,url: "{:url('common/upload')}"
                ,multiple: true
                ,accept:"images"
                ,size:"50000"
                ,done: function(res){
                    //上传完毕回调
                    layer.closeAll('loading');
                    if(res.code == 2) {
                        $('#seeupload6').append('<span class="uploadimgbox"><img class="layui-upload-img" src="'+res.src+'"><i class="layui-icon">&#x1006;</i></span>');
                        $('#upload-thumb6').val($('#upload-thumb6').val()+","+res.src);
                    } else {
                        layer.msg(res.msg);
                    }
                }
                ,error: function(){
                    //请求异常回调
                    //演示失败状态，并实现重传
                    layer.closeAll('loading');
                    var demoText = $('#demoText');
                    demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-mini demo-reload">重试</a>');
                    demoText.find('.demo-reload').on('click', function(){
                        uploadInst.upload();
                    });
                }
                ,before:function () {
                    layer.load(2);
                }
            });

            upload.render({
                elem: '#upload11'
                ,url: "{:url('common/upload')}"
                ,multiple: true
                ,accept:"images"
                ,size:"50000"
                ,done: function(res){
                    //上传完毕回调
                    layer.closeAll('loading');
                    if(res.code == 2) {
                        $('#seeupload11').append('<span class="uploadimgbox"><img class="layui-upload-img" src="'+res.src+'"><i class="layui-icon">&#x1006;</i></span>');
                        $('#upload-thumb11').val($('#upload-thumb11').val()+","+res.src);
                    } else {
                        layer.msg(res.msg);
                    }
                }
                ,error: function(){
                    //请求异常回调
                    //演示失败状态，并实现重传
                    layer.closeAll('loading');
                    var demoText = $('#demoText');
                    demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-mini demo-reload">重试</a>');
                    demoText.find('.demo-reload').on('click', function(){
                        uploadInst.upload();
                    });
                }
                ,before:function () {
                    layer.load(2);
                }
            });
        });
        $("#seeupload1").on("click",".layui-icon",function(){
            $(this).parent().remove();
            thumb("seeupload1",1);
        });

        $("#seeupload2").on("click",".layui-icon",function(){
            $(this).parent().remove();
            thumb("seeupload2",2);
        });

        $("#seeupload3").on("click",".layui-icon",function(){
            $(this).parent().remove();
            thumb("seeupload3",3);
        });

        $("#seeupload4").on("click",".layui-icon",function(){
            $(this).parent().remove();
            thumb("seeupload4",4);
        });

        $("#seeupload5").on("click",".layui-icon",function(){
            $(this).parent().remove();
            thumb("seeupload5",5);
        });

        $("#seeupload6").on("click",".layui-icon",function(){
            $(this).parent().remove();
            thumb("seeupload6",6);
        });

        $("#seeupload11").on("click",".layui-icon",function(){
            $(this).parent().remove();
            thumb("seeupload6",6);
        });

        function thumb(obj,n){
            var thumbs="";
            $("#"+obj).find("img").each(function(){
                var url=$(this).attr("src");
                thumbs+=","+url;
            });
            $("#upload-thumb"+n).val(thumbs);
        }
    </script>
</body>
</html>
